package org.mall.modules.pay.job;

import org.mall.modules.order.job.AutomaticCommentJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/***
 *@author yinxucun
 *@date 2020-01-05 16:13
 */
@Component
public class StaticTask {
    @Autowired
    private PayNotifyJob payNotifyJob;

    @Autowired
    private AutomaticCommentJob automaticCommentJob;
    @Autowired
    private PayExpireJob payExpireJob;

    @Scheduled(cron = "0 2 * * * ? ")
    public void payNotify() throws InterruptedException {
        payNotifyJob.execute();
    }
    @Scheduled(cron = "0 0 0 7 * ? ")
    public  void AutomaticCommentJob(){
        automaticCommentJob.execute("");
    }

}
